Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 520: Allow to modify Date.format in the main common.js file #523

Merged
merged 2 commits into from
Jan 14, 2019

Conversation

veggiematts
Copy link
Contributor

Improvement/fix for #520 : Date.format (used by datepickers) is now configurable in a single file (js/common.js ) (instead of having to configure it in every module)

@veggiematts
Copy link
Contributor Author

veggiematts commented Jan 9, 2019

Test plan:

  1. Edit Date.format in js/common.js. It must be set accordingly to date_format in common/configuration.ini, otherwise dates won't be stored properly.
    Example:
Date.format = 'dd-mm-yyyy';
date_format = '%d-%m-%Y'

Or

Date.format = 'YYYY/mm/dd';
date_format = '%Y/%m/%d'
  1. Check that the date format provided by the Datepickers in all the modules are correct.

  2. Check that dates are stored properly.

@poacherone
Copy link
Collaborator

Works as intended! Very nice!

The only (tiny) related issue I found is that in when editing Cost history there is a date format already filled in the empty row (in light gray), I suppose as a guide on how to write the date format. This date format isn't affected by the changes in this PR, nor PR 518

@veggiematts
Copy link
Contributor Author

You're right. The placeholder was hardcoded. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants